﻿<Page x:Class="Resn.WhuPub.WPFClientUI.ManageEmployeesPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:extToolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit.Extended"
      Style="{StaticResource PageStyle}" Loaded="Page_Loaded">

        <Grid Name="LayoutRoot">
                <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                        <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <Grid>
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="员工管理"
                                    />
                        <Button Content="新建" Grid.Column="2" Style="{DynamicResource ButtonStyle}" Click="CreateButton_Click" />
                        <Button Content="编辑" Grid.Column="3" Style="{DynamicResource ButtonStyle}" Click="UpdateButton_Click" />
                        <Button Content="删除" Grid.Column="4" Style="{DynamicResource ButtonStyle}" Click="DeleteButton_Click" />
                        <extToolkit:SplitButton Grid.Column="5" Content="搜索" Style="{StaticResource SplitButtonStyle}" Click="SearchButton_Click">
                                <extToolkit:SplitButton.DropDownContent>
                                        <Border Style="{StaticResource BorderStyle}"
                                                Background="{StaticResource ContentGridColor}">
                                                <StackPanel>
                                                        <Button Content="全部" Style="{DynamicResource ButtonStyle}" 
                                                                Click="SearchAllButton_Click"/>
                                                        <Button Content="离职员工" Style="{DynamicResource ButtonStyle}"
                                                                Click="SearchLeaveButton_Click" />
                                                </StackPanel>
                                        </Border>
                                </extToolkit:SplitButton.DropDownContent>
                        </extToolkit:SplitButton>
                </Grid>

                <Grid Grid.Row="1">
                        <ListBox Name="EmployeesListBox"
                                 Style="{StaticResource ListBoxStyle}"
                                 ItemsSource="{Binding Employees}"
                                 ItemTemplate="{StaticResource EmployeeDataTemplate}"
                                 SelectedValue="{Binding Employee}"/>
                </Grid>

                <Grid Grid.Row="2">
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="1" Style="{StaticResource PageBackButtonStyle}" />
                                
                </Grid>
        </Grid>
</Page>